#if !defined(AFX_SUBSQDIAGQUERYPAGE_H__E72166BC_C67A_4EFF_9D8D_86D600A34BD0__INCLUDED_)
#define AFX_SUBSQDIAGQUERYPAGE_H__E72166BC_C67A_4EFF_9D8D_86D600A34BD0__INCLUDED_

#include "PageDialog.h"
#include "../Common/LinkDate.h"

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SubsqDiagQueryPage.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CSubsqDiagQueryPage dialog

class CSubsqDiagQueryPage : public CPageDialog
{
// Construction
public:
	CSubsqDiagQueryPage(CWnd* pParent = NULL);   // standard constructor

	virtual BOOL	Prepare();
	virtual BOOL	ClearUp();
	
	virtual BOOL	ShowTableData(CString strMRN);
	
// Dialog Data
	//{{AFX_DATA(CSubsqDiagQueryPage)
	enum { IDD = IDD_DIALOG_PAGE_SUBSQ_QUERY };
	CLinkDateEdit	m_edtBeginDate;
	CLinkDateEdit	m_edtEndDate;
	CListCtrl	m_listHistory;
	CListCtrl	m_listDiag;
	CString	m_strTotolSteps;
	CString	m_strTotalTime;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSubsqDiagQueryPage)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CSubsqDiagQueryPage)
	virtual BOOL OnInitDialog();
	afx_msg void OnButtonNewSdiag();
	afx_msg void OnDblclkListSubsqtDiag(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnButtonStatQuery();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

private:
	void			ShowDiagTableInfo(CString strMRN);
	void			ShowHistoryTableInfo(CString strMRN);
	void			ShowHistoryDataByDate(CString strMRN, DWORD dwSN, BOOL bAllTime);
	CTime			CString2CTime(CString strTime);

private:
	BOOL			m_bInited;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SUBSQDIAGQUERYPAGE_H__E72166BC_C67A_4EFF_9D8D_86D600A34BD0__INCLUDED_)
